package com.example.product.feign;


import com.example.product.feign.common.CommonResult;
import com.example.product.feign.param.Price;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(contextId = "remoteProductService",value = "product-service")
public interface RemoteProductService {

    @GetMapping("/hello")
    String hello();

    @PostMapping("/price")
    CommonResult<Integer> price(@RequestBody List<Price> price);


    @PostMapping
    CommonResult<Boolean> lockStock(@RequestBody Price price);


}
